package common;

public abstract class ApplicationModule extends Thread {

	protected boolean requestStop = false;

	protected boolean run = true;
	
	public ApplicationModule(String threadName) {
		super(threadName);
	}
	
	public void requestStop() {
		requestStop = true; 
	}

	public boolean isActive(){
		return run;
	}
	
	public boolean isStopRequested(){	
		return requestStop;
	}
	
	public void shutdown(){
		run = false;
		requestStop = true;
	}

}
